<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>打印出库单 -- 大眼窝ERP系统</title>
<load href='__PUBLIC__/bootstrap/css/bootstrap.min.css' />
<load href='__PUBLIC__/Css/style.css' />
<style type="text/css">
.table-bordered {
      border: 1px solid black;
}

.table-bordered th,
.table-bordered td {
      border-left: 1px solid black;
}
.table th, .table td {
    border-top: 1px solid black;
}
</style>
<style media="print" type="text/css"> 
.Noprint{display:none;} 
.PageNext{page-break-after: always;} 
</style> 
</head>
<body>
<div class="heading Noprint">
 <span class="offset1">涌江出库单</span> <span class="offset3"><button onClick="window.print()" class="btn btn-primary offset1"><i class="icon-print  icon-white"></i>打印</button></span>
</div>
<h1 style="text-align:center;font-family:微软雅黑">上海涌江出库单</h1>
<table class="table table-bordered">
   <tr>  <td colspan="1">订单号</td><td colspan="1">{$vo.wholesale_no} </td>  <td colspan="1">出库日期</td>
         <td colspan="5">{$vo.shipping_time|toDate}</td>
   </tr>
   <tr>  <td colspan="1">客户</td><td colspan="1"><b>{$vo.customer_name}</b> </td>  <td colspan="1">订单来源</td>
         <td colspan="5">{$vo.wholesale_source_id|getConfigVal='wholesale_source'}</td>
   </tr>
   <tr>
       <th>品牌</th>
       <th>产品</th>
       <th>规格</th>
       <th>单位</th>
       <th>单价</th>
       <th>数量</th>
       <th>金额</th>
       <th>备注</th>
   </tr>
<?php 
    $map = 'wholesale_id = '.$vo['id'] ;
    $products = M('wholesale_detail')->where($map)->order('id desc')->findAll(); 
 ?>
   <volist name="products" id="ca">
   <tr>
                <php>
                    $product = M('Product');
                    $product->getById($ca['product_id']);
                </php>
                <td>{:getModelName($product->brand_id,'Brand')}</td>
                <td>{:$product->name}
               <td> {$ca.product_id|printLensOption}</td>
                <td>{:getModelName($product->unit_id,'Unit')}</td>
                <td>{$ca.enter_price}</td>
                <td>{$ca.number}</td>
                <td>{$ca.total}</td>
                <td></td>
            </tr>
            
    </volist>
    <tr> <th colspan="2">合计数量:{$vo.sum_number}</th><th colspan="6">合计金额：{$vo.total}</th> </tr>
    <tr> <th colspan="2">制单人:{$vo.user_id|getModelName='User'}</th><th colspan="3">审核：</th> <th colspan="3">财务：</th></tr>
</table>
